FROM openjdk:8-jdk-alpine
VOLUME /tmp
ADD intelli-community-msg-server.jar app.jar
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone
RUN sh -c 'touch /app.jar'
ENV JAVA_OPTS=""
ENV SERVER_PORT=""
ENV PROFILE="DEFAULT"
#ENTRYPOINT ["java","-jar","$JAVA_OPTS","-Dspring.profiles.active=$PROFILE","-Djava.security.egd=file:/dev/./urandom","-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=15378","app.jar"]
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=$PROFILE -jar /app.jar" ]